<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/Strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>Example for FreeGroup Draw2D 0.9.26 (CommandStackListener)</title>
        <link type="text/css" rel="stylesheet" href="../demo.css" />

    <!-- common, all times required, imports -->        <SCRIPT src='../../wz_jsgraphics.js'></SCRIPT>      <SCRIPT src='../../mootools.js'></SCRIPT>      <SCRIPT src='../../moocanvas.js'></SCRIPT>      <SCRIPT src='../../draw2d.js'></SCRIPT>


        <!-- workflow specific imports -->
	<SCRIPT src="MyCommandListener.js"></SCRIPT>
</head>
<body onselectstart="return false;" style="margin:0px;padding:0px;" onkeydown="">
<div id="paintarea" style="position:absolute;left:0px;top:0px;width:3000px;height:3000px" >
    <!-- The information help text -->
    <div class="stickyNote">
    <center><b>Draw2D 0.9.26 - A simple diagram drawing demo<br>
    by Andreas Herz (a.herz @ freegroup.de)
    <br>
    </b>
    <br>
    <div style="color:red;font-size:9pt">Focus of this example: How to fetch CommandStack events.</div>
    </center>
    <br>
    <center>See more on <a href="http://www.draw2d.org">FreeGroup Draw2D 0.9.26</a></center>
    </div>
    <div id="log" style="background-color:white;font-size:8pt;position:absolute;top:50px;left:500px;width:300px;height:3000px;">Event-Log Console<br>=================
</div>
</div>
<script>
  var workflow  = new draw2d.Workflow("paintarea");

  // Add s hint annotation to the workflow area
  //
  var annotation = new draw2d.Annotation("NOTE: Move the rectangle to see the CommandStackEvents in the console log. Additional you can press ctrl+z for undo.");
  annotation.setDimension(250,70);
  workflow.addFigure(annotation,200,200);

  // Add a simple Rectangle to the canvas
  //
  var startObj = new draw2d.Rectangle(200,200);
  workflow.addFigure(startObj, 200,300);

  // Don't forget to register the CommandStackEventListener if you want to receive events ;-)
  //
  workflow.getCommandStack().addCommandStackEventListener(new draw2d.MyCommandListener());
</script>
</body>
</html>
